import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { CircleManageComponent } from './circle-manage/circle-manage.component';
import { PostTypeComponent } from './post-type/post-type.component';
import { CirclePlateComponent } from './circle-plate/circle-plate.component';
import { ReportManageComponent } from './report-manage/report-manage.component';
import { ReportRecordComponent } from './report-record/report-record.component';
import { PostsManageComponent } from './posts-manage/posts-manage.component';
import { PostsDetailsComponent } from './posts-details/posts-details.component';
import { PostsReleaseComponent } from './posts-release/posts-release.component';

const routes: Routes = [
  // 默认访问
  { path: '', redirectTo: 'circleManage', pathMatch: 'full' },

  // 圈子管理
  {
    path: 'circleManage',
    component: CircleManageComponent,
    data: { breadcrumb: '圈子管理' },
    children: []
  },
  // 帖子类型
  {
    path: 'postType',
    component: PostTypeComponent,
    data: { breadcrumb: '帖子类型' },
    children: []
  },
  // 圈子板块
  {
    path: 'circlePlate',
    component: CirclePlateComponent,
    data: { breadcrumb: '圈子板块' },
    children: []
  },
  // 举报管理
  {
    path: 'reportManage',
    component: ReportManageComponent,
    data: { breadcrumb: '举报管理', keep: true },
    children: []
  },
  // 举报详情
  {
    path: 'reportRecord/:id',
    component: ReportRecordComponent,
    data: { breadcrumb: '举报详情' },
    children: []
  },
  // 帖子管理
  {
    path: 'postsManage',
    component: PostsManageComponent,
    data: { breadcrumb: '帖子管理' },
    children: []
  },
  // 帖子详情
  {
    path: 'postsDetails/:id',
    component: PostsDetailsComponent,
    data: { breadcrumb: '帖子详情' },
    children: []
  },
  // 发布帖子
  {
    path: 'postsRelease/:id',
    component: PostsReleaseComponent,
    data: { breadcrumb: '发布帖子' },
    children: []
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class BusinessCircleRoutingModule { }